import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import Home from '../views/home/Home.vue'
import Details from '../views/details/Details.vue'
import Index from '../views/home/index/Index.vue'
import ClassIfication from '../views/home/classification/Classification.vue'
import Message from '../views/home/message/Message.vue'
import Shopping from '../views/home/shopping/Shopping.vue'
import MyName from '../views/home/myname/MyName.vue'
import Page404 from '../views/page404/Page404.vue'
const router = new VueRouter({
    mode:'history',
    routes:[
      {
        path:'/',
        redirect:"/home",
        // component(()=>)
      } ,
      {
          path:'/home',
          name:'home',
          component:Home,
          redirect:'/home/index',
          children:[
              {
                path:'index',
                component:Index  
              },
              {
                path:'classification',
                component:ClassIfication  
              },
              {
                path:'message',
                component:Message  
              },
              {
                path:'shopping',
                component:Shopping  
              },
              {
                path:'myname',
                component:MyName  
              },
          ]
      },
      {
        path:'/home/details',
        name:'details',
        component:Details
      },
      
        // {
        //    path:'*',
        //    component:Page404      
        // }  
    ]
})
export default router